<?php

require_once '/../classes/Gebruiker.php';

if (isset ($_POST['submit'])){
    
  
    $new = new Gebruiker;
    $new->setUserName($_POST['username']);
    $new->setPassword($_POST['password']);
    $new->setEmail($_POST['email']);
    $new->setSecurity_Question($_POST['secret_question']);
    $new->setSecurity_Answer($_POST['secret_answer']);
    $new->setRecht_id(2);
    $new->Registreren();
    
      echo "<pre>";
        var_dump($new);
      echo "</pre>";
    
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/style.css" />

<title>Robotik Informatiesysteem</title>
</head>

<body>
    <div id="page">
		
        <div id="titlebar">

            <h1> Robotik Informatiesysteem</h1>
      </div>
        <div id="bar">
            <ul>
                <li><a href="#">Catalogus</a></li>
                <li><a href="form_login.php">Inloggen</a></li>
                <li><a href="form_registreren.php">Registreren</a></li>
            
            </ul>
      </div>
        <div id="main">
    <form action ='' method ='post'>
                    <table>
                        <tr>
                            <td><label for="username">Naam:</label></td>
                            <td><input name="username" type="text" /></td>
                        </tr>
                        <tr>
                            <td><label for="password">Gewenst Wachtwoord:</label></td>
                            <td><input name="password" type="password" /></td>
                        </tr>
                        <tr>
                            <td><label for="email">E-mail</label></td>
                            <td><input name="email" type="text" /></td>
                        </tr>
                        <tr>
                            <td><label for="Secret_Question">Geheime vraag:</label></td>
                            <td><input name="secret_question" type="text" /></td>
                           
                        </tr>
                        <tr>
                            <td><label for="Secret_Answer">Geheim Antwoord:</label></td>
                            <td><input name="secret_answer" type="text" /></td>
                         </tr>
                        <tr>
                            <td> <input type="submit" name="submit" id="knoppen" value="Registreren" alt="toevoegen" /> </td>
                        </tr>
                    </table><br/>
                   
                        
                </form>
    </html>
        </div>
        
        <div id="footer">Copyright 2012: RoboTik</div>
        </div>
</body>
</html>
